// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addTrainingPlan POST /api/trainingPlan/add */
export async function addTrainingPlanUsingPost(
  body: API.TrainingPlanAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/trainingPlan/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** dayNewlyAddedTrainingPlan POST /api/trainingPlan/day/newly/added */
export async function dayNewlyAddedTrainingPlanUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseListDataGroupByDateDTO_>('/api/trainingPlan/day/newly/added', {
    method: 'POST',
    ...(options || {}),
  });
}

/** deleteTrainingPlan POST /api/trainingPlan/delete */
export async function deleteTrainingPlanUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/trainingPlan/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** editTrainingPlan POST /api/trainingPlan/edit */
export async function editTrainingPlanUsingPost(
  body: API.TrainingPlanEditRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/trainingPlan/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getTrainingPlanVOById GET /api/trainingPlan/get/vo */
export async function getTrainingPlanVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTrainingPlanVOByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseTrainingPlanVO_>('/api/trainingPlan/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listTrainingPlanByPage POST /api/trainingPlan/list/page */
export async function listTrainingPlanByPageUsingPost(
  body: API.TrainingPlanQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageTrainingPlan_>('/api/trainingPlan/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listTrainingPlanVOByPage POST /api/trainingPlan/list/page/vo */
export async function listTrainingPlanVoByPageUsingPost(
  body: API.TrainingPlanQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageTrainingPlanVO_>('/api/trainingPlan/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listMyTrainingPlanVOByPage POST /api/trainingPlan/my/list/page/vo */
export async function listMyTrainingPlanVoByPageUsingPost(
  body: API.TrainingPlanQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageTrainingPlanVO_>('/api/trainingPlan/my/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** updateTrainingPlan POST /api/trainingPlan/update */
export async function updateTrainingPlanUsingPost(
  body: API.TrainingPlanUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/trainingPlan/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
